#ifndef COLOR_H
#define COLOR_H

#include <GL/gl.h>

class EnergyColor;

struct Color {
	Color();
	Color(const Color &);
	Color(const EnergyColor &);
	Color(const unsigned int &);
	Color(const double &, const double &, const double &, const double & = 1.0);
	~Color();

	double operator[](const unsigned int &) const;
	Color &operator=(const Color &);
	Color &operator=(const EnergyColor &);
	bool operator==(const Color &) const;
	bool operator!=(const Color &) const;
	Color operator+(const Color &) const;
	Color operator-(const Color &) const;
	Color operator*(const Color &) const;
	Color operator*(const double &) const;
	Color operator/(const double &) const;

    GLfloat *toGL(GLfloat _v[], double = 1) const;

	Color truncate() const;
	virtual void print() const;

	double red, green, blue, alpha;
};

#endif
